package com.kaifamiao.abstracts;

public class Stage {

    // 形参是 Sinaean 意味着未来传递的实参时可以是 Sinaean 类型及其子类类型
    public void perform( Sinaean s ) {
        // System.err.println( System.identityHashCode( s ) );
        s.doTaiChi();
    }

    public static void main(String[] args) {

        Stage stage = new Stage();

        Han h = new Han();
        h.name = "霍元甲";
        // System.err.println( System.identityHashCode( h ) );
        stage.perform( h );

        System.err.println( "- ".repeat( 10 ) );

        Hui u = new Hui();
        u.name = "相爷";
        // System.err.println( System.identityHashCode( u ) );
        stage.perform( u );
    }

}
